#ifndef HAR_DATA_H
#define HAR_DATA_H

#include "miniexp.h"
#define CACHE_SIZE 33554432

#include "ddjvuapi.h"
static ddjvu_context_t *instance;
static ddjvu_document_t *document;

static void handle_message() {
    ddjvu_message_t *msg = ddjvu_message_wait(instance);
    if (msg->m_any.tag == DDJVU_ERROR) {
        int lineno = msg->m_error.lineno;
        const char *filename = msg->m_error.filename;
        const char *message = msg->m_error.message;
        if (filename == NULL) {
            printf("Error: %s.", message);
        } else {
            printf("Error: %s: '%s:%d'.", message, filename, lineno);
        }
    }
    ddjvu_message_pop(instance);
}
#endif
